// CExplorerHostUIHandler.h : Declaration of the CCExplorerHostUIHandler

#pragma once
#include "resource.h"       // main symbols



#include "bdc2_h.h"



#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
#error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
#endif

using namespace ATL;


// CCExplorerHostUIHandler

class ATL_NO_VTABLE CCExplorerHostUIHandler :
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CCExplorerHostUIHandler, &CLSID_CExplorerHostUIHandler>,
	public ICExplorerHostUIHandler,
	public IDocHostUIHandler
{
public:
	CCExplorerHostUIHandler()
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_CEXPLORERHOSTUIHANDLER)

DECLARE_NOT_AGGREGATABLE(CCExplorerHostUIHandler)

BEGIN_COM_MAP(CCExplorerHostUIHandler)
	COM_INTERFACE_ENTRY(ICExplorerHostUIHandler)
	COM_INTERFACE_ENTRY(IDocHostUIHandler)
END_COM_MAP()



	DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		return S_OK;
	}

	void FinalRelease()
	{
	}

	STDMETHOD(ShowContextMenu)( 
		/* [in] */ DWORD dwID,
		/* [in] */ POINT *ppt,
		/* [in] */ IUnknown *pcmdtReserved,
		/* [in] */ IDispatch *pdispReserved)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(GetHostInfo)( 
		/* [out][in] */ DOCHOSTUIINFO *pInfo)
	{
		pInfo->dwFlags |= DOCHOSTUIFLAG_NO3DBORDER;
		return S_OK;
	}

	STDMETHOD(ShowUI)( 
		/* [in] */ DWORD dwID,
		/* [in] */ IOleInPlaceActiveObject *pActiveObject,
		/* [in] */ IOleCommandTarget *pCommandTarget,
		/* [in] */ IOleInPlaceFrame *pFrame,
		/* [in] */ IOleInPlaceUIWindow *pDoc)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(HideUI)( void)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(UpdateUI)( void)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(EnableModeless)( 
		/* [in] */ BOOL fEnable)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(OnDocWindowActivate)( 
		/* [in] */ BOOL fActivate)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(OnFrameWindowActivate)( 
		/* [in] */ BOOL fActivate)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(ResizeBorder)( 
		/* [in] */ LPCRECT prcBorder,
		/* [in] */ IOleInPlaceUIWindow *pUIWindow,
		/* [in] */ BOOL fRameWindow)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(TranslateAccelerator)( 
		/* [in] */ LPMSG lpMsg,
		/* [in] */ const GUID *pguidCmdGroup,
		/* [in] */ DWORD nCmdID)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(GetOptionKeyPath)( 
		/* [annotation][out] */ 
		__out  LPOLESTR *pchKey,
		/* [in] */ DWORD dw)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(GetDropTarget)( 
		/* [in] */ IDropTarget *pDropTarget,
		/* [out] */ IDropTarget **ppDropTarget)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(GetExternal)( 
		/* [out] */ IDispatch **ppDispatch)
	{
		CFrameWnd * pFrame = (CFrameWnd *)(AfxGetApp()->m_pMainWnd);
		*ppDispatch = pFrame->GetActiveDocument()->GetIDispatch(TRUE);
		return S_OK;
	}

	STDMETHOD(TranslateUrl)( 
		/* [in] */ DWORD dwTranslate,
		/* [annotation][in] */ 
		__in __nullterminated  OLECHAR *pchURLIn,
		/* [annotation][out] */ 
		__out  OLECHAR **ppchURLOut)
	{
		return E_NOTIMPL;
	}

	STDMETHOD(FilterDataObject)( 
		/* [in] */ IDataObject *pDO,
		/* [out] */ IDataObject **ppDORet)
	{
		return E_NOTIMPL;
	}

public:



};

OBJECT_ENTRY_AUTO(__uuidof(CExplorerHostUIHandler), CCExplorerHostUIHandler)
